package com.kyd.push.model;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.kyd.push.common.enums.EnumKit;
import com.kyd.push.common.enums.ValueEnum;


/**
 * PushTypeEnum
 *
 * @author MarsBuilder on 2018/8/16 14:55
 */
public enum PushTypeEnum implements ValueEnum<String> {

    NONE("none", "没有"),
    ORDER("order", "运单"),
    AD_ORDER_FINISH("ad_order_finish", "活动"),
    ;

    private final String value;
    private final String name;

    PushTypeEnum(String value, String name) {
        this.value = value;
        this.name = name;
    }

    @JsonValue
    public String value() {
        return this.value;
    }

    public String getName() {
        return this.name;
    }

    @JsonCreator
    public static PushTypeEnum forValue(String value) {
        return EnumKit.forValue(value, PushTypeEnum.class);
    }
}
